import { ICondition } from '../../interfaces';
import send_msg from './_service';

export default function javadsd<T>(_action_id: string, _session_id: string, spaceid: string, systemid: string, refsystemid: string, modelid: string, condition: ICondition) {
	if (!condition) {
		condition = {
			paging: {
				index: 1,
				size: 12
			},
			param: {},
			sort: {}
		} as any;
	}
	if (!condition.paging) {
		condition.paging = {
			index: 1,
			size: 12
		};
	}
	if (!condition.param) {
		condition.param = {} as any;
	}
	if (!condition.sort) {
		condition.sort = {};
	}
	const msg = {
		condition,
		modelid,
		refsystemid,
		spaceid,
		systemid
	};
	return send_msg<T>('dataservice.javadsd', msg, false, false);
}
